<%--
  @author Tharanga Punchihewa
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<div id="land-registration-module-home-title" class="module-home-title">
    <s:a href="landAlienationModuleHome.do">
        <span><img src="${pageContext.request.contextPath}/images/interest-party.png" alt="Initial Alienation Applications">
        <s:label value="%{getText('land_alienation.label')}"/></span>
        </s:a>
    <div id="back-button" align="right">
            <s:form><s:submit value="%{getText('back_btn.label')}" action="home"/></s:form>
    </div>
</div>

<s:actionmessage/>


<s:include value="../notifications.jsp"/>

<div id="land-alienation-module-home" class="module-home">

<div class="page-title">
    <h2><s:label value="%{getText('alienation_applications.label')}"/></h2>
</div>
<ul>

<s:if test="#session.userGroup=='orlm'">
<%--initial land add/edit--%>
<li>
    <s:a href="initLandAlienation.do">
        <img src="${pageContext.request.contextPath}/images/init-form.png" alt="Initial Alienation Applications">
        <span><s:label value="%{getText('initial_alienation_applications.label')}"/></span>
    </s:a>
</li>
<li>
    <s:a href="initApplicationToBeEdit.do">
        <img src="${pageContext.request.contextPath}/images/modify-form.png" alt="Initial Alienation Applications">
        <span><s:label value="%{getText('modify_initial_alienation_applications.label')}"/></span>
    </s:a>
</li>

<%--detailed land add/edit.send to approve. todo: remove alienation (attach land) section from jsp--%>
<li>
    <s:a href="approvedInitApplicationFormsList.do">
        <img src="${pageContext.request.contextPath}/images/detailed-form.png"
             alt="Detailed Alienation Applications">
        <span><s:label value="%{getText('detailed_alienation_applications.label')}"/></span>
    </s:a>
</li>
</s:if>
<s:elseif test="#session.userGroup=='lo' || #session.userGroup=='orip'">
    <%--initial land add/edit--%>
    <li>
        <s:a href="initLandAlienation.do">
            <img src="${pageContext.request.contextPath}/images/init-form.png" alt="Initial Alienation Applications">
            <span><s:label value="%{getText('initial_alienation_applications.label')}"/></span>
        </s:a>
    </li>
    <li>
        <s:a href="initApplicationToBeEdit.do">
            <img src="${pageContext.request.contextPath}/images/modify-form.png" alt="Initial Alienation Applications">
            <span><s:label value="%{getText('modify_initial_alienation_applications.label')}"/></span>
        </s:a>
    </li>

    <%--detailed land add/edit.send to approve. todo: remove alienation (attach land) section from jsp--%>
    <li>
        <s:a href="approvedInitApplicationFormsList.do">
            <img src="${pageContext.request.contextPath}/images/detailed-form.png"
                 alt="Detailed Alienation Applications">
            <span><s:label value="%{getText('detailed_alienation_applications.label')}"/></span>
        </s:a>
    </li>
  <%--  <li>
        <s:a href="detailApplicationToBeEdit.do">
            <img src="${pageContext.request.contextPath}/images/modify-form.png" alt="Modify Initial Land Information">
            <span><s:label value="%{getText('modify_detail_alienation_application.label')}"/></span>
        </s:a>
    </li>--%>

    <%--todo: conducting interviews. no approval--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=DETAILED_FORM_APPROVED">
            <img src="${pageContext.request.contextPath}/images/interview.png" alt="Modify Initial Land Information">
            <span><s:label value="%{getText('conducting_interviews.label')}"/></span>
        </s:a>
    </li>

    <%--todo: handling objections. --%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=INTERVIEW_COMPLETED">
            <img src="${pageContext.request.contextPath}/images/objections.png" alt="Modify Initial Land Information">
            <span><s:label value="%{getText('handling_objections.label')}"/></span>
        </s:a>
    </li>


    <%--todo: attach land --%>

    <li>
        <s:a href="loadApplicationList.do?workflowTask=DETAILED_FORM_FINALIZED">
            <img src="${pageContext.request.contextPath}/images/attachLand.png" alt="Modify Initial Land Information">
            <span><s:label value="%{getText('attach_land.label')}"/></span>
        </s:a>
    </li>

    <%--complete application--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=LAND_ALLOCATION_APPROVED">
            <img src="${pageContext.request.contextPath}/images/completed.png" alt="Modify Initial Land Information">
            <span><s:label value="%{getText('complete_application.label')}"/></span>
        </s:a>
    </li>
    <%--  <li>
      <s:a href="loadApplicationListToBeCompleted.do">
          <img src="${pageContext.request.contextPath}/images/Company.jpg" alt="Attach Land to Application">
          <span><s:label value="%{getText('alienation_task.label')}"/></span>
      </s:a>
  </li>
  <li>
      <s:a href="loadLandListToDefileAM.do">
          <img src="${pageContext.request.contextPath}/images/interest-party.png" alt="Define Alienation Method on Land">
          <span><s:label value="%{getText('define_alienation_method_on_land.label')}"/></span>
      </s:a>
  </li>  --%>


    <%--prepare agreement--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=FULLY_APPROVED"><img src="${pageContext.request.contextPath}/images/agreement.png"
                                                     alt="Initial Alienation Applications"><span>
                    <s:label value="%{getText('prepare_alienation_document.label')}"/></span></s:a>
    </li>

    <%--issue agreement--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=SIGNED_ALIENATION_DOCUMENT_APPROVED"><img src="${pageContext.request.contextPath}/images/landAlienation.png"
                                               alt="Initial Alienation Applications"><span>
                    <s:label value="%{getText('issue_alienation_document.label')}"/></span></s:a>
    </li>
</s:elseif>
<s:if test="#session.userGroup=='ords' || #session.userGroup=='orip'">
    <li>
        <s:a href="initApplicationApprove.do">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Initial Alienation Applications">
            <span><s:label value="%{getText('initial_alienation_applications_approval.label')}"/></span>
        </s:a>
    </li>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=DETAILED_FORM_DATA_ENTRY">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Detailed Alienation Applications">
            <span><s:label value="%{getText('detailed_alienation_applications_approval.label')}"/></span>
        </s:a>
    </li>
    <%-- <li>
        <s:a href="loadApplicationList.do?workflowAction=approved">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Alienation">
            <span><s:label value="%{getText('alienation_approval.label')}"/></span>
        </s:a>
    </li>--%>

    <%--todo: handling objections. send to approval of PLC and DS--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=OBJECTION_DATA_ENTRY">
            <img src="${pageContext.request.contextPath}/images/registration-form.png"
                 alt="Modify Initial Land Information">
            <span><s:label value="%{getText('handling_objections.label')}"/></span>
        </s:a>
    </li>

  <%--  <li>
        <s:a href="appListToBeFinalizedPageLoad.do">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Detail Alienation Applications">
            <span><s:label value="Finalize Detailed Application"/></span>
        </s:a>
    </li>--%>
    <%-- <li>
      <s:a href="loadApplicationListToAlienate.do">
          <img src="${pageContext.request.contextPath}/images/Company.jpg" alt="Alienate">
          <span><s:label value="%{getText('alienation_task.label')}"/></span>
      </s:a>
  </li>  --%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=SIGNED_PRINTED_ALIENATION_DOCUMENT"><img src="${pageContext.request.contextPath}/images/agreement.png"
                                                     alt="agreement"><span><s:label
                value="%{getText('agreement_title.label')}"/></span></s:a>
    </li>
    <li>
        <s:a href="loadDetailedApplicationListToSchedule.do">
            <img src="${pageContext.request.contextPath}/images/schedule-task.png" alt="Schedule Appointment">
            <span><s:label value="%{getText('schedule_appointment.label')}"/></span>
        </s:a>
    </li>

</s:if>
<s:if test="#session.userGroup=='plc'">
    <li>
        <s:a href="loadApplicationList.do?workflowTask=OBJECTION_HANDLING_COMPLETED">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Detailed Alienation Applications">
            <span><s:label value="%{getText('objections_approval.label')}"/></span>
        </s:a>
    </li>
    <%--<li>
        <s:a href="loadDetailedApplicationListToBeFinalized.do">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Detailed Alienation Applications">
            <span><s:label value="%{getText('detailed_alienation_applications_approval.label')}"/></span>
        </s:a>
    </li>--%>
    <li>
        <s:a href="loadApplicationList.do?workflowTask=ACCEPTED_AND_COMPLETED_APPLICATION_APPROVED">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Alienation">
            <span><s:label value="%{getText('alienation_approval.label')}"/></span>
        </s:a>
    </li>
</s:if>
<s:if test="#session.userGroup=='lcg'">
    <li>
        <s:a href="loadApplicationList.do?workflowAction=approved">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Alienation">
            <span><s:label value="%{getText('alienation_approval.label')}"/></span>
        </s:a>
    </li>
    <li>
        <s:a href="initLeasePaymentSetup.do"><img src="${pageContext.request.contextPath}/images/detailed-form.png"
                                                     alt="Initial Alienation Applications"><span>
                    <s:label value="%{getText('setup_alienation_detail.label')}"/></span></s:a>
    </li>
</s:if>
<s:if test="#session.userGroup=='orlp'">
    <li>
        <s:a href="loadApplicationList.do?workflowAction=approved">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Alienation">
            <span><s:label value="%{getText('alienation_approval.label')}"/></span>
        </s:a>
    </li>
</s:if>
<s:if test="#session.userGroup=='psec'">
    <li>
        <s:a href="loadApplicationList.do?workflowAction=approved">
            <img src="${pageContext.request.contextPath}/images/accept.png" alt="Alienation">
            <span><s:label value="%{getText('alienation_approval.label')}"/></span>
        </s:a>
    </li>
</s:if>
</ul>
</div>